import request from './http'

//获取热门商品
export const goodsTop = params => {
    return request({
        url:'/api/goodsTop',
        method:'get',
        params
    })
}

//获取商品列表
export const bookList = params => {
    return request({
        url:'/api/bookList',
        method:'get',
        params
    })
}

//获取商品详情 
export const bookDetail = params => {
    return request({
        url:'/api/bookInfo',
        method:'get',
        params
    })
}

//浏览量增长
export const viewAdd = params => {
    return request({
        url:'/api/viewAdd',
        method:'get',
        params
    })
}

//获取分类
export const getCategory = params => {
    return request({
        url:'/api/getCategory',
        method:'get',
        params
    })
}

//获取二级分类
export const reclassify = params => {
    return request({
        url:'/api/reclassify',
        method:'get',
        params
    })
}

//搜索
export const search = params => {
    return request({
        url:'/api/search',
        method:'get',
        params
    })
}

//根据分类获取商品
export const getBookByCategory = params => {
    return request({
        url:'/api/getBookByCategory',
        method:'get',
        params
    })
}

//获取设置
export const setting = params => {
    return request({
        url:'/api/setting',
        method:'get',
        params
    })
}

//获取轮播图
export const getBanner = params => {
    return request({
        url:'/api/banner',
        method:'get',
        params
    })
}